package com.dem02;

/**
 * @program: fanxing
 * @description:
 * @author: 诸葛龙辰
 * @create: 2022-10-25 19:19
 **/
public class Test1 {
    public static void main(String[] args) {
        //整形
        Point<Integer> p1=new Point<>(15,116);
             //无需在强制转换---不会造成数据类型安全问题
                Integer x = p1.getX();
                Integer y = p1.getY();
                System.out.println(p1);


                Point<String> p2=new Point<>("东经150度","北纬25度");
                String y1 = p2.getY();
                String x1 = p2.getX();
                System.out.println(p2);

                //我们在定义类时 指定泛型的标识可以有多个。
                Info<Integer,Double,String> info=new Info<>();
                info.a=25;


            }
}
        class Info<A,B,C>{
            public A a;
            public B b;
            public C c;
    }

